import { http } from '@/utils/axios/init'

// 相同前缀
const prefix = '/ctms/Rest/centerFeeTypeConfig'

// 列表查询
export function getExpensesTypeList(params) {
  return http.request({
    url: `${prefix}/list`,
    method: 'get',
    params
  })
}

// 新增
export function addExpensesType(params) {
  return http.request(
    {
      url: `${prefix}/save`,
      method: 'post',
      params
    },
    {
      successMessageText: '新增成功'
    }
  )
}

// 编辑
export function editExpensesType(params) {
  return http.request(
    {
      url: `${prefix}/update`,
      method: 'post',
      params
    },
    {
      successMessageText: '操作成功'
    }
  )
}

// 删除
export function delExpensesType(params) {
  return http.request(
    {
      url: `${prefix}/delete`,
      method: 'post',
      params
    },
    {
      successMessageText: '操作成功'
    }
  )
}
// 禁用启用
export function updateValidExpensesType(params) {
  return http.request(
    {
      url: `${prefix}/updateValid`,
      method: 'post',
      params
    },
    {
      successMessageText: '操作成功'
    }
  )
}
// 上/下移
export function moveSortExpensesType(params) {
  return http.request(
    {
      url: `${prefix}/moveSort`,
      method: 'post',
      params
    },
    {
      successMessageText: '操作成功'
    }
  )
}
